package com.itboye.jinpuyiyuan.widget.camera;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;


import com.itboye.jinpuyiyuan.R;
import com.itboye.jinpuyiyuan.base.BaseActivity;

/**
 * 自定义相机界面，抠图
 */
public class CameraActivity extends BaseActivity {
    private Button take_pic;
    private CameraSurfaceView mCameraSurfaceView;
    private CameraTopRectView rectOnCamera;

    public static CameraActivity activitys;

    public static CameraActivity getInstance() {
        return activitys;
    }

    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        setContentView(R.layout.activity_camera);
        onInit();
    }


    private void onInit() {
        activitys=this;
        take_pic= (Button) findViewById(R.id.take_pic);
        mCameraSurfaceView = (CameraSurfaceView) findViewById(R.id.cameraSurfaceView);
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.take_pic:
                mCameraSurfaceView.takePicture(CameraActivity.this);
                break;
        }
    }
}
